package com.atguigu.guilimall.search.feign;


import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 远程调用
 *
 * @author Administrator
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /**
     * 根据属性Id 属性返回结果
     *
     * @param attrId
     * @return
     */
    @GetMapping("/product/attr/info/{attrId}")
    R info(@PathVariable("attrId") Long attrId);

    /**
     * 根据所有品牌Id 获取所有信息
     *
     * @param brandIds
     * @return
     */
    @GetMapping("/product/brand/infos")
    R brandInfos(@RequestParam("brandIds") List<Long> brandIds);
}
